/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kiosk;

import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.Endpoint;
import queues.NotificationsObserver;
import queues.NotificationsService;

/**
 *
 * @author Renato Rosa <2101076@my.ipleiria.pt>
 */
@WebService(name = "KioskNotifService", serviceName = "KioskNotifService", portName = "KioskNotifService")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class KioskNotifService extends NotificationsService<NotificationsObserver> {
    private String port = "4444";
    
    @Override
    protected Endpoint publish(String ipAddress) {
        String address = "http://" + ipAddress+ ":" + port + "/KioskNotifService";
        Endpoint endp = Endpoint.create(this);
        endp.setExecutor(singleThread);
        endp.publish(address);
        System.out.println("Web service was published successfully.\n" + "WSDL URL: " + address + "?WSDL");
        return endp;
    }
}
